package service;

import java.util.List;

import org.hibernate.Query;

import model.New;
import dao.NewDao;

public class NewService extends BaseService {

	private NewDao newDao;

	public void setNewDao(NewDao newDao) {
		this.newDao = newDao;
	}
	
	public void saveOrUpdate(New news){
		newDao.saveOrUpdate(news);
	}
	
	public void delete(Integer id){
		newDao.delete(id);
	}
	
	public List<New> getAll(){
		List<New> news = newDao.getAll();
		return news;
	}
	
	public New get(Integer id){
		return newDao.get(id);
	}
	
	public List<New> getTest(){
		List<New> news = newDao.getTest();
		return news;
	}
	public List<New> getTest1(){
		List<New> news = newDao.getTest1();
		return news;
	}
	
	public List<New> getT1(){
		List<New> news = newDao.getT1();
		return news;
	}
	public List<New> getT2(){
		List<New> news = newDao.getT2();
		return news;
	}
	public List<New> getT3(){
		List<New> news = newDao.getT3();
		return news;
	}
	public List<New> getT4(){
		List<New> news = newDao.getT4();
		return news;
	}
	
	public List<New> getById(Integer id){
		List<New> news = newDao.getById(id);
		return news;
	}
	
	public List<New> getT(String s){
		List<New> news = newDao.getById(s);
		return news;
		
	}

}
